import request from '@/utils/request';

// 查询新闻详情
export const queryNewsDetailApi = (id) => {
  return request({
    url: '/news_info',
    params: {
      id
    }
  });
};

// 查询浏览信息
export const queryNewsVisitApi = (id) => {
  return request({
    url: '/story_extra',
    params: {
      id
    }
  });
};

// 收藏新闻
export const collectNewsApi = (newsId) => {
  return request({
    url: '/store',
    method: 'post',
    data: {
      newsId
    }
  });
};
// 查询收藏的列表
export const queryCollectListApi = () => {
  return request({
    url: '/store_list'
  });
};

// 取消收藏
export const cancelCollectApi = (id) => {
  return request({
    url: '/store_remove',
    params: {
      id
    }
  });
};
